package com.suxiaofang.library.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import java.util.Date;

/**
 * 文件名：Book
 * 创建者：蔡江鸿
 * 创建时间：2022/9/13-21:34
 * 描述：
 */
@Data
@TableName(value="book")
public class Book {


    @ApiModelProperty("id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty("书名")
    private String name;
    @ApiModelProperty("作者")
    private String author;
    @ApiModelProperty("出版社")
    private String press;
    @ApiModelProperty("isbn")
    private String isbn;
    @ApiModelProperty("类别")
    private String category;
    @ApiModelProperty("库存")
    private String stock;
    @ApiModelProperty("借出数量")
    private String lending;
    @ApiModelProperty("剩余数量")
    private String surplus;
    @ApiModelProperty("逻辑删除")
    private Boolean isDelete;
    @ApiModelProperty("禁用启用")
    private Boolean enable;
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy年MM月dd日",timezone="Asia/Shanghai")
    private Date createTime;
    @ApiModelProperty("缩略图")
    private String avatar;

    @Override
    public String toString() {
        return "Book{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", press='" + press + '\'' +
                ", isbn='" + isbn + '\'' +
                ", category='" + category + '\'' +
                ", stock='" + stock + '\'' +
                ", lending='" + lending + '\'' +
                ", surplus='" + surplus + '\'' +
                ", isDelete=" + isDelete +
                ", enable=" + enable +
                ", createTime=" + createTime +
                ", avatar='" + avatar + '\'' +
                '}';
    }
}
